<#assign base=request.contextPath />
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<#include "/common/common.ftl">
<@pnotify/>
<@layui/>
<@selfcss/>
</head>
<body>
<div class="form-horizontal layui-form">
    <div class="modal-body  row">
        <div class="form-group col-md-3" style="float: left;">
            <label for="icon_show" class="control-label img_label">头像</label>
            <div class="site-demo-upload">
                <img id="icon_show" src="${customer.icon}">
                <div class="site-demo-upbar">
                    <div class="layui-box layui-upload-button">
                        <form target="layui-upload-iframe" method="get" key="set-mine" enctype="multipart/form-data"
                              action="${base}/resources/test/test.json">
                            <input type="file" name="file" class="layui-upload-file" id="file_icon">
                        </form>
                        <span class="layui-upload-icon"><i class="layui-icon"></i>上传图片</span></div>
                </div>
            </div>
        </div>

        <form role="form" method="post" action="${base}/vip/customer" id="edit_vip_form" class="form-group col-md-8"
              style="float: left;">
            <input type="hidden" name="_method" value="put">
            <input type="hidden" name="id" value="${customer.id}">
            <input type="hidden" name="icon" id="icon" value="${customer.icon}"/>
            <div class="form-group col-md-6">
                <label for="name" class="col-md-4 control-label">会员姓名</label>
                <div class="col-md-8">
                    <input type="text" name="name" class="form-control" value="${customer.name}" id="name"
                           placeholder="会员姓名">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label for="cardNo" class="col-md-4 control-label">会员卡号</label>
                <div class="col-md-8">
                    <input type="text" name="cardNo" class="form-control" value="${customer.cardNo}" id="cardNo"
                           placeholder="会员卡号">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label for="phone" class="col-md-4 control-label">电话号码</label>
                <div class="col-md-8">
                    <input type="text" name="phone" class="form-control" value="${customer.phone}" id="phone"
                           placeholder="电话号码">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label for="birthday" class="col-md-4 control-label">生日</label>
                <div class="col-md-8">
                <#--<div class="layui-inline">-->
                <#--<div class="layui-input-inline form-control">-->
                    <input type="text" name="birthday" id="birthday" lay-verify="date" autocomplete="off"
                           class="form-control " onclick="layui.laydate({elem: this})"
                           placeholder="生日" value="${customer.birthday}">
                <#--</div>-->
                <#--</div>-->
                </div>
            </div>

            <div class="form-group col-md-6">
                <label for="idNo" class="col-md-4 control-label">身份证号</label>
                <div class="col-md-8">
                    <input type="text" name="idNo" class="form-control" value="${customer.idNo}" id="idNo"
                           placeholder="身份证号">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label for="level" class="col-md-4 control-label">会员级别</label>
                <div class="col-md-8">
                    <input type="text" name="level" class="form-control" value="${customer.level}" id="level"
                           placeholder="会员级别">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label for="address" class="col-md-4 control-label">住址</label>
                <div class="col-md-8">
                    <input type="text" name="address" class="form-control" value="${customer.address}" id="address"
                           placeholder="住址">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label for="validity" class="col-md-4 control-label">有效期</label>
                <div class="col-md-8">
                    <input type="text" name="validity" id="validity" lay-verify="date" autocomplete="off"
                           class="form-control"
                           onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
                           placeholder="有效期"
                           value="${customer.validity}">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label for="startTime" class="col-md-4 control-label">开卡日期</label>
                <div class="col-md-8">
                <#--<div class="layui-inline">-->
                    <input type="text" name="startTime" id="startTime" lay-verify="date" autocomplete="off"
                           class="form-control"
                           onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
                           placeholder="开卡日期"
                           value="${customer.startTime}">
                <#--</div>-->
                </div>
            </div>
            <div class="form-group col-md-6">
                <label for="endTime" class="col-md-4 control-label">到期日期</label>
                <div class="col-md-8">
                    <input type="text" name="endTime" id="endTime" lay-verify="date" autocomplete="off"
                           class="form-control"
                           onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
                           placeholder="到期日期"
                           value="${customer.endTime}">
                </div>
            </div>
            <div class="form-group col-md-6">
                <label for="counselorId" class="col-md-4 control-label">会籍顾问</label>
                <div class="col-md-8">
                <#--<input type="text" name="counselorId" class="form-control" value="${customer.counselorId}"-->
                <#--id="counselorId" placeholder="会籍顾问">-->
                    <select name="counselorId" id="counselorId" lay-verify="counselorId"
                            data-value="${customer.counselorId}" value="${customer.counselorId}" placeholder="性别">
                        <option value="">请选会籍顾问</option>
                    <#--<option value="M">男</option>-->
                    <#--<option value="FM">女</option>-->
                    <#--<option value="OT">其他</option>-->
                    </select>
                </div>
            </div>
            <div class="form-group col-md-6">
                <label for="sex" class="col-md-4 control-label">性别</label>
                <div class="col-md-8">
                <#--<div class="layui-form-item">-->
                <#--<div class="layui-input-inline">-->
                    <select name="sex" id="sex" placeholder="性别" class="form-control">
                        <option value="">请选性别</option>
                        <option value="M" <#if customer.sex == 'M'>selected</#if>>男</option>
                        <option value="FM" <#if customer.sex == 'FM'>selected</#if>>女</option>
                        <option value="OT" <#if customer.sex == 'OT'>selected</#if>>其他</option>
                    </select>
                <#--</div>-->
                <#--</div>-->
                </div>
            </div>
        </form>
    </div>
    <div class="modal-footer ">
        <button type="submit" class="btn btn-primary" id="sub_edit_btn">保存</button>
        <button type="button" class="btn btn-default close_btn" data-dismiss="modal">关闭</button>
    </div>
</div>
<@index/>
</body>
</html>
